package org.lc.stk.model.paper;

import java.util.List;

import org.hibernate.annotations.Comment;
import org.lc.stk.model.question.attrs.QuestionType;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;

/**
 * 试卷内一大题，包含多小题，另外包含分值等信息。属于具体的试卷
 */
@Entity
@Table(name = "examPaperQuestionSet")
@Comment("试卷内一大题，包含多小题，另外包含分值等信息。属于具体的试卷")
public class ExamPaperQuestionSet {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @ManyToOne
    @Comment("题目类型")
    private QuestionType questionType;

    /**
     * 总分
     */
    @Column
    @Comment("总分")
    private Integer totalScore;

    /**
     * 具体题目
     */
    @Comment("具体题目")
    @OneToMany
    private List<ExamPaperQuestion> questions;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public QuestionType getQuestionType() {
        return questionType;
    }

    public void setQuestionType(QuestionType questionType) {
        this.questionType = questionType;
    }

    public Integer getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Integer totalScore) {
        this.totalScore = totalScore;
    }

    public List<ExamPaperQuestion> getQuestions() {
        return questions;
    }

    public void setQuestions(List<ExamPaperQuestion> questions) {
        this.questions = questions;
    }
}
